<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
</head>

<body>
    <div class="container">

    </div>
</body>

</html>
<script src="./js/utils.js"></script>
<script>
    let container = document.querySelector('.container')

    let id = getQueryString('productid');
    // console.log(id)

    fetch('http://chst.vip:1234/api/getmoneyctrlproduct?productid=' + id)
        .then(body => body.json())
        .then(res => {
            console.log(res)
            let r = res.result[0];
            // console.log(r)
            let regExp = /(?<=imgurl=)[^'"]*/;
            let url = r.productImg2.match(regExp);
            // console.log(url)
            let el = `<img src=${url[0]} alt="" />
            <div class="content">${r.productInfo1}</div>
            <div class="content">${r.productInfo2}</div>`

            container.innerHTML = el;
        })
</script>